package com.codemonkey.lq.common.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * 存储一组操作的返回标志值; 暂不公开
 * 
 * @author LQ
 * 
 */
final class ResultCollection {
    private final List<Boolean> results;

    public ResultCollection() {
        super();

        results = new ArrayList<Boolean>();
    }

    public void addResult(Boolean result) {
        results.add(result);
    }

    public boolean isAllSuccess() {
        for (boolean isSuccess : results) {
            if (false == isSuccess) {
                return false;
            }
        }

        return true;
    }
}
